package com.david.course_design.shopping_center.module.user.service.impl;

import com.david.course_design.shopping_center.module.login.VO.LoginVo;
import com.david.course_design.shopping_center.module.login.VO.RegisterVo;
import com.david.course_design.shopping_center.module.user.entity.User;
import com.david.course_design.shopping_center.module.user.mapper.UserMapper;
import com.david.course_design.shopping_center.module.user.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;


    @Override
    public LoginVo LoginInterface(LoginVo loginVo) {
        return userMapper.LoginInterface(loginVo);
    }

    @Override
    public Integer addUserInformationByNameAndPassword(RegisterVo registerVo) {

        //  执行插入操作
        Integer insert = userMapper.RegisterInterface(registerVo);

        //  返回插入操作的结果
        return insert;
    }
}
